import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './index.scss';
const navList = [
  { path: '/', title: '首页', icon: '' },
  { path: '/ss', title: '归档', icon: '' },
  { path: '/', title: '标签', icon: '' }
];

class Header extends Component {
  render() {
    return (
      <header className="page-header">
        <div className="container header">
          <div className="logo">
            <Link to={'/'}>木匠</Link>
          </div>

          <nav className="header-nav">
            {navList.map(({ path, title, icon }, index) => (
              <Link to={path} key={`${title}-${index}`} className="nav-item">
                {icon && <i className="icon "></i>}
                {title}
              </Link>
            ))}
          </nav>
        </div>
      </header>
    );
  }
}

export default Header;
